﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using frm_timkiem.DataAccess;
using System.Data;

namespace frm_timkiem.Controller
{
    class TimKiemController
    {
        TimKiemData data = new TimKiemData();
        public void SapXepDuLieuLenfromThongKedo_an_uong(DataGridView dgv, BindingNavigator bn)
        {

            BindingSource bs = new BindingSource();
            bs.DataSource = data.Thongke_an_uong();
            dgv.DataSource = bs;
            bn.BindingSource = bs;
        }
        public void Update()
        {
            data.Update();
        }
        public DataTable xulytimkiem(String txtMatHang, String p1, String txtSoLuong)
        {
            TimKiemData tk = new TimKiemData();
            return tk.TimKiem(txtMatHang, p1, txtSoLuong);
        }

    }
}
